package com.zhangfei.exception;

import org.springframework.security.access.AccessDeniedException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class MyExceptionHandler {
    //异常处理
    @ExceptionHandler(AccessDeniedException.class)
    public String error() {
        return "no auth";
    }



}
